﻿<%@ Page Title="Responder Contacto de Usuarios" Language="C#" MasterPageFile="~/MasterPage.master"
	AutoEventWireup="true" CodeFile="ResponseContactUs.aspx.cs" Inherits="User_ResponseContactUs" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="ESF.Web" Namespace="ESF.Web.ServerControls" TagPrefix="esf" %>

<asp:Content ID="cntEncabezado" ContentPlaceHolderID="cntEncabezado" runat="server">
<style type="text/css">
.lblCountResumen { display:block;float:left;clear:left; width:100%; text-align:center; margin-top:6px; margin-bottom:6px; padding: 6px 10px 6px 10px; border:solid 1px #b2b2b2; font-style:italic; }
.divSendReceiveData { display:block;float:left;clear:left; width:100%; height:160px; margin-bottom:6px; }
</style>
</asp:Content>

<asp:Content ID="cntContenido" ContentPlaceHolderID="cntContenido" runat="Server">
	<asp:Panel CssClass="divForm" runat="server" DefaultButton="btnBrowse">
		<div class="header">
			<div class="icon">
			</div>
			<div class="title">
				<asp:Label ID="lblTitle" runat="server"></asp:Label>
			</div>
			<div class="subtitle">
				Diligencie los filtros para buscar y dar respuesta a un mensaje del usuario
			</div>
		</div>
		<asp:UpdatePanel ID="updFields" runat="server" UpdateMode="Conditional">
			<Triggers>
				<asp:AsyncPostBackTrigger ControlID="btnClear" />
			</Triggers>
			<ContentTemplate>
				<div class="divField">
                    <div class="label">
                        Nombre del Usuario
                    </div>
                    <div class="field">
                        <asp:TextBox ID="txtUserFullName" runat="server" MaxLength="240"></asp:TextBox>
                    </div>
                </div>
                <div class="divField divField_half" style="display: none;">
                    <div class="label">
                        Tipo Identificación
                    </div>
                    <div class="field">
                        <asp:DropDownList ID="ddlUserIdentificationType" runat="server" Width="214px">
                        </asp:DropDownList>
                    </div>
                </div>
                <div class="divField divField_half">
                    <div class="label">
                        Número Identificación
                    </div>
                    <div class="field">
                        <asp:TextBox ID="txtUserIdentificationNumber" runat="server" MaxLength="20"></asp:TextBox>
                    </div>
                </div>
				<div class="divField divField_half">
					<div class="label">
						Email
					</div>
					<div class="field">
						<asp:TextBox ID="txtSenderEmail" MaxLength="150" runat="server"></asp:TextBox>
					</div>
				</div>
				<div class="divField">
					<div class="label">
						Categoria
					</div>
					<div class="field">
						<asp:DropDownList ID="ddlContactUsType" runat="server">
						</asp:DropDownList>
					</div>
				</div>
				<div class="divField">
					<div class="label">
						Atendido
					</div>
					<div class="field">
						<asp:DropDownList ID="ddlWithResponse" runat="server">
						</asp:DropDownList>
					</div>
				</div>
				<div class="divField">
					<div class="divSubField">
						<div class="label">
							Inicio
							<asp:RegularExpressionValidator ID="revtxtStartMessageDate" runat="server" meta:resourcekey="revtxtStartMessageDate"
								Text="*" Display="Dynamic" ValidationExpression="^(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$"
								ControlToValidate="txtStartMessageDate"></asp:RegularExpressionValidator>
						</div>
						<div class="field">
							<asp:TextBox ID="txtStartMessageDate" runat="server" Width="80px" MaxLength="10"></asp:TextBox>
							<span class="instructions">Ejemplo: 1981-11-10</span>
							<asp:CalendarExtender ID="txtStartMessageDate_CalendarExtender" runat="server" Enabled="True"
								PopupButtonID="imgStartMessageDate" TargetControlID="txtStartMessageDate" Format="yyyy-MM-dd">
							</asp:CalendarExtender>
							<asp:ImageButton ID="imgStartMessageDate" ImageUrl="~/Images/Icons/icoCalendar.png"
								CausesValidation="false" runat="server" />
						</div>
					</div>
					<div class="divSubField">
						<div class="label">
							Fin
							<asp:RegularExpressionValidator ID="revtxtEndMessageDate" runat="server" meta:resourcekey="revtxtEndMessageDate"
								Text="*" Display="Dynamic" ValidationExpression="^(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$"
								ControlToValidate="txtEndMessageDate"></asp:RegularExpressionValidator>
						</div>
						<div class="field">
							<asp:TextBox ID="txtEndMessageDate" runat="server" Width="80px" MaxLength="10"></asp:TextBox>
							<span class="instructions">Ejemplo: 1981-11-10</span>
							<asp:CalendarExtender ID="txtEndMessageDate_CalendarExtender" runat="server" Enabled="True"
								PopupButtonID="imgEndMessageDate" TargetControlID="txtEndMessageDate" Format="yyyy-MM-dd">
							</asp:CalendarExtender>
							<asp:ImageButton ID="imgEndMessageDate" ImageUrl="~/Images/Icons/icoCalendar.png"
								CausesValidation="false" runat="server" />
						</div>
					</div>
				</div>
				<div style="width: 48%;">
					<asp:UpdatePanel ID="updOtherApps" runat="server" UpdateMode="Conditional">
						<ContentTemplate>
							<input type="hidden" id="hidExtraValue" runat="server" />
							<iframe id="ifrStep_3" runat="server" style="width: 366px; margin-top: 4px; height: 56px;
								overflow: hidden;" frameborder="0" scrolling="no"></iframe>
						</ContentTemplate>
					</asp:UpdatePanel>
				</div>
			</ContentTemplate>
		</asp:UpdatePanel>
		<div class="divOperations">
			<asp:UpdatePanel ID="updOperations" runat="server" UpdateMode="Conditional">
				<ContentTemplate>
					<asp:CustomValidator ID="cvlIframeOtherApps" runat="server" Enabled="false"></asp:CustomValidator>
					<asp:Button ID="btnBrowse" runat="server" Text="Consultar" CausesValidation="true"
						OnClick="btnBrowse_Click" />
					<asp:Button ID="btnClear" runat="server" Text="Limpiar" UseSubmitBehavior="false"
						CausesValidation="false" OnClick="btnClear_Click" />
				</ContentTemplate>
			</asp:UpdatePanel>
		</div>
		<asp:UpdatePanel ID="uppResults" runat="server" UpdateMode="Conditional">
			<Triggers>
				<asp:AsyncPostBackTrigger ControlID="btnBrowse" />
				<asp:AsyncPostBackTrigger ControlID="btnClear" />
				<asp:AsyncPostBackTrigger ControlID="dpggrvResults" />
			</Triggers>
			<ContentTemplate>
				<asp:Label ID="lblCountResumen" runat="server" CssClass="lblCountResumen"></asp:Label>
				<esf:DataPagging ID="dpggrvResults" PageSize="20" CssClass="pager" runat="server" Visible="false"
					OnOnPageChanged="dpggrvResults_OnPageChanged" ReplicatePaggingControlIDs="dpggrvResults_footer" />
				<asp:GridView ID="grvResults" runat="server" AutoGenerateColumns="false" OnRowDataBound="grvResults_RowDataBound"
					OnRowCommand="grvResults_RowCommand">
					<Columns>
						<asp:TemplateField HeaderText="Sel." HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
							<HeaderTemplate>
								<asp:CheckBox ID="chkSelectAll" runat="server" AutoPostBack="true" OnCheckedChanged="chkSelectAll_CheckedChanged" />								
							</HeaderTemplate>
							<ItemTemplate>
								<br />
								<asp:Label ID="lblRowIndex" runat="server"></asp:Label><br /><br />
								<asp:HiddenField ID="hidItemID" runat="server" />
								<asp:CheckBox ID="chkSelect" runat="server" />
							</ItemTemplate>
						</asp:TemplateField>
						<asp:TemplateField HeaderText="Mensaje">
							<ItemStyle Width="48%" />
							<ItemTemplate>
								<div class="divSendReceiveData">
									<asp:Label ID="lblContactUsType" runat="server"></asp:Label>
									<asp:Label ID="lblUserAlias" runat="server"></asp:Label>
									<asp:Label ID="lblCalUserFullName" runat="server"></asp:Label>
									<b>Email: </b>
									<asp:Label ID="lblSenderEmail" runat="server"></asp:Label><br />
									<i>Teléfono Dom. Ext:&nbsp</i>
									<asp:Label ID="lblHomePhone" runat="server"></asp:Label><br />
									<i>Corporación:&nbsp</i>
									<asp:Label ID="lblEnterprise" runat="server"></asp:Label><br />
									<br />
									<asp:Label ID="lblTitle" runat="server"></asp:Label>
									<asp:HiddenField ID="hidTitle" runat="server" />
									<b>Fecha y Hora: </b>
									<asp:Label ID="lblCreationDateTime" runat="server"></asp:Label><br />
									<b>Comentario: </b>
								</div>
								<asp:TextBox ID="txtComments" ReadOnly="true" runat="server" Width="99%" TextMode="MultiLine"
									Rows="7"></asp:TextBox>
							</ItemTemplate>
						</asp:TemplateField>
						<asp:TemplateField HeaderText="Respuesta">
							<ItemStyle Width="48%" />
							<ItemTemplate>
								<div class="divSendReceiveData">
									<asp:Label ID="lblResponseUserAlias" runat="server"></asp:Label>
									<asp:Label ID="lblResponseCalUserFullName" runat="server"></asp:Label>
									<asp:Label ID="lblResponseDateTime" runat="server"></asp:Label><br />
									<b>Respuesta: </b>
									<asp:RequiredFieldValidator ID="rfvtxtResponse" ControlToValidate="txtResponse" SetFocusOnError="true"
										Display="Dynamic" Text="*" ErrorMessage="Diligencie la Respuesta" ValidationGroup="valResponse" runat="server"></asp:RequiredFieldValidator>
								</div>
								<asp:TextBox ID="txtResponse" runat="server" TextMode="MultiLine" Rows="7" MaxLength="3000"
									Width="99%"></asp:TextBox>
								<asp:Button ID="btnSendResponse" CommandName="SendResponse" UseSubmitBehavior="false"
									runat="server" Text="Enviar Respuesta" ValidationGroup="valResponse" />
								<asp:ConfirmButtonExtender ID="btnSendResponse_ConfirmButtonExtender" runat="server"
									ConfirmText="¿Desea enviar esta respuesta?" TargetControlID="btnSendResponse">
								</asp:ConfirmButtonExtender>
							</ItemTemplate>
						</asp:TemplateField>
					</Columns>
				</asp:GridView>
				<esf:DataPagging ID="dpggrvResults_footer" MasterDataPaggingControlID="dpggrvResults" CssClass="pager" runat="server" />
			</ContentTemplate>
		</asp:UpdatePanel>
	</asp:Panel>
</asp:Content>
